package com.rightsidetech.system.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class AddLevelRuleReq implements Serializable {

    @ApiModelProperty("等级(如:1一级)")
    @Range(min = 0,max = 100,message = "等级格式错误")
    @NotNull(message = "等级必填项不能为空")
    private Byte level;

    @ApiModelProperty("等级名称(如:钻石会员)")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,50}$", message = "等级名称为中文")
    @NotBlank(message = "等级名称必填项不能为空")
    private String levelName;

    @ApiModelProperty("订单数")
    @Range(min = 0,message = "订单数格式错误")
    @NotNull(message = "订单数必填项不能为空")
    private Long orderNum;




}